package com.sunshine.springboot.controller.request;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * post 请求测试
 *
 * @author WeiHong
 * @date 2018/8/13
 */
@RestController
@RequestMapping("post")
public class PostController {

    private final Map<String, Object> params = new HashMap<>(2);

    @PostMapping("login")
    public Map<String, Object> login(String userName, String pwd) {
        params.clear();
        params.put("userName", userName);
        params.put("pwd", pwd);
        return params;
    }
}
